<%@ page contentType="text/html; charset=UTF-8"%>
<%@include file="../../common/taglibs.jsp"%>
<script type="text/javascript">
    $(document).ready(function () {
        jQuery("#billDetailGrid").jqGrid({
            url:'${ctx}/billDetail/gridByBill.do?billId=${bean.id}',
            datatype: "json",
//            colNames:["ID","帐单号","支付金额","支付日期","记账日期","经手人","操作"],
            colNames:["ID","支付日期","支付金额","记账日期","经手人"],
            colModel:[
                {name:'id',index:'id',width:80,align:"center",sortable:false, hidden: true},
//                {name:'bill',index:'bill',width:80,align:"center",sortable:false},
                {name:'payDate',index:'payDate',width:80,align:"center",sortable:false},
                {name:'amount',index:'amount',width:80,align:"right",formatter:'currency',formatoptions:{thousandsSeparator:',',prefix:'￥'},sortable:false},
                {name:'handDate',index:'handDate',width:80,align:"center",sortable:false},
                {name:'handler',index:'handler',width:80,align:"center",sortable:false}
            ],
            rowNum:10,
            autowidth :true, // 宽度自适应父窗口宽度
            mtype:"POST", // POST GET
            prmNames:{rows:"pageSize", sort:"orderBy", order:"order"}, // 设置翻页、排序参数
            rowList:[10,20,50],
            pager: '#pageBillDetailGrid',
            jsonReader: { repeatitems : false },
            shrinkToFit: true,
            caption: "账单明细列表",
//            multiselect: true,
            rownumbers: true,
            height: 230,
            footerrow : true,
            userDataOnFooter : true
        });

        jQuery("#billDetailGrid").jqGrid('navGrid','#pageBillDetailGrid',{edit:false,add:false,del:false,search:false});

        $("#viewTable tr:odd").addClass("cssline_1");
        $("#viewTable tr:even").addClass("cssline");
    });
</script>

<div>
      <div>
            <table border="0" cellspacing="1" width="100%" id="viewTable">
                <tr>
                    <td class="label" width="25%">
                        帐单项目:
                    </td>
                    <td  class="container">
                      ${bean.project.name}
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        任务:
                    </td>
                    <td  class="container">
                      ${bean.task.name}
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        金额:
                    </td>
                    <td  class="container">
                      ${bean.amount}
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        帐单类型:
                    </td>
                    <td  class="container">
                      ${bean.billType.name}
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        帐单生成日期:
                    </td>
                    <td  class="container">
                      ${bean.accoutDate}
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        经手人:
                    </td>
                    <td  class="container">
                      ${bean.handler}
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        修改人:
                    </td>
                    <td  class="container">
                      ${bean.modifier}
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        备注:
                    </td>
                    <td  class="container">
                      ${bean.remark}
                    </td>
                </tr>
                <tr>
                    <td colspan="2" valign="middle" align="center">
                        <input type="button" value="关闭" class="btn_Del" onclick="closeWindow('billWindow')">
                    </td>
                </tr>
            </table>
    </div>
    <table id="billDetailGrid"></table>
    <div id="pageBillDetailGrid"></div>
</div>